home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Visual Basic 5.0 (2nd Edition) / Hardcore Visual Basic 5.0 - Second Edition (1997)(Microsoft Press).iso / Code / COLORP~1.CLS < prev    next >
Text File  |  1997-06-14  |  934b  |  44 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "CColorPicker"
  6. Attribute VB_GlobalNameSpace = False
  7. Attribute VB_Creatable = True
  8. Attribute VB_PredeclaredId = False
  9. Attribute VB_Exposed = True
  10. Option Explicit
  11.  
  12. Public Enum EErrorColorPicker
  13.     eeBaseColorPicker = 13670   ' CColorPicker
  14. End Enum
  15.  
  16. Private frm As New FColorPicker
  17.  
  18. Sub Load(Optional ByVal Left As Single = -1#, _
  19.          Optional ByVal Top As Single = -1#, _
  20.          Optional ByVal Wide As Boolean = True)
  21.     frm.Wide = Wide
  22.     If Left <> -1# Then frm.Left = Left
  23.     If Top <> -1# Then frm.Top = Top
  24.     frm.Show vbModal
  25. End Sub
  26.  
  27. Property Get Color() As Long
  28.     Color = frm.Color
  29. End Property
  30.  
  31. Property Let Color(clr As Long)
  32.     frm.Color = clr
  33. End Property
  34.  
  35. Property Get Wide() As Boolean
  36.     Wide = frm.Wide
  37. End Property
  38.  
  39. Property Let Wide(fWide As Boolean)
  40.     frm.Wide = fWide
  41. End Property
  42.  
  43.  
  44.